#ifndef _PM_ENGINE_HPP_
#define _PM_ENGINE_HPP_

#include <string>

/*---------------------------------------------------------------------------*/

namespace ProjectManager {

	struct Project;
	struct Repository;
	struct Trigger;

/*---------------------------------------------------------------------------*/

struct Engine
{
/*---------------------------------------------------------------------------*/

public:

/*---------------------------------------------------------------------------*/

	virtual ~Engine() {}

	virtual Project& newProject( const std::string& _name ) = 0;

	virtual Repository& newRepository(
			const std::string& _name
		,	const std::string& _url
		,	const std::string& _username = ""
		,	const std::string& _password = ""
	) = 0;

	virtual Trigger& newTrigger(
			const Repository& _repository
		,	unsigned int _checkInterval
	) = 0;

	virtual int getProjectsCount() const = 0;

	virtual Project& getProject( int _idx ) = 0;

/*---------------------------------------------------------------------------*/

};

/*---------------------------------------------------------------------------*/

} // namespace ProjectManager

/*---------------------------------------------------------------------------*/

#endif // _PM_ENGINE_HPP_
